import React from 'react';
import BuildOutlined from '@material-ui/icons/BuildOutlined';
import { NavView, get_mod, NavListSub, loc } from 'sui';
import { AccountView } from './account/view';

const model = (cfg) => {
    const fix = [
        {uid: "equip.account", view: AccountView, value: loc("l_872")},
    ];

    return get_mod(cfg, fix, "equip");
};

const Equip = ({ mod, setEvent, sideopen, cfg }) => <NavView cfg={cfg} model={model(cfg)} mod={mod} setEvent={setEvent} sideopen={sideopen} name="equip"/>;

const NavEquip = (props) => <NavListSub icon={<BuildOutlined/>} sub={model(props.cfg)} {...props} scut={15}/>;

export {NavEquip, Equip};
